package com.dzsw.temp;

import cn.hutool.core.codec.Base64;
import com.dzsw.util.FileUtil;

import java.nio.charset.Charset;

public class ReadFile {

    public static void main(String[] args) throws Exception {
        String file = "d:\\1.dat";

        byte[] bytes = FileUtil.getFileBytes(file);
        String str = new String(bytes);
        System.out.println(str);
        bytes = Base64.decode(bytes);
        str = new String(bytes, Charset.forName("windows-31j"));
        System.out.println(str);
    }

}
